<%--列表页搜索区--%>
<%@ tag body-content="scriptless"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> 
<%@ attribute name="formAction" required="true" rtexprvalue="true" type="java.lang.String" description="搜索form的action属性"%>
<%@ attribute name="searchOnclick" required="false" rtexprvalue="true" type="java.lang.String" description="搜索按钮点击事件，默认为表单提交，非定制方式可以不填"%>
<%@ attribute name="resetOnclick" required="false" rtexprvalue="true" type="java.lang.String" description="重置按钮点击事件 ，默认没有事件，非定制方式可以不填"%>
<%@ attribute name="formId" required="false" rtexprvalue="true" type="java.lang.String" description="form id"%>
<%@ attribute name="enableMoreSearch" required="false" rtexprvalue="true" type="java.lang.Boolean" description="是否有高级搜索,默认true"%>

<c:if test="${empty searchOnclick}">
	<c:set var="searchOnclick" value="doSearchHandler();"/>
</c:if>
<c:if test="${empty resetOnclick}">
	<c:set var="resetOnclick" value="fnResetForm('searchFormContent');"/>
</c:if>

<c:if test="${empty formId}">
	<c:set var="formId" value="searchForm"/>
</c:if>

<content tag="searchBox">
	<form id="${formId}" method="post" action="${formAction}" onkeypress="return keypress(event);"> 
	<script type="text/javascript">
		function keypress(event){
			if(event.keyCode == 13){
				$j("#search").trigger("click");
				return false;
			}
			return true;
		}
	</script>
	<div id="searchShow" class="pop"
		onblur="$j('#searchShow').attr('class', 'pop');">
		<div title="<fmt:message key="search.advancedSearch.tip"/>" class="txt" <c:if test="${not empty enableMoreSearch and !enableMoreSearch}">style="display:none;"</c:if>>
			<a id="advancedSearchLink" href="#"
				onclick="$j('#searchShow').attr('class')=='pop'?$j('#searchShow').attr('class', 'more'):$j('#searchShow').attr('class', 'pop');">
				<fmt:message key="search.advancedSearch" /> </a>
			<%-- 很多模块没有用框架这个参数，先屏蔽  class="${sc.searchCriteriaChanged?'change':'' }"
				<c:if test="${sc.searchCriteriaChanged}">title="<fmt:message key="search.searchCriteriaChanged"/><fmt:message key="search.advancedSearch.tip"/>"</c:if> --%>
		</div>
		<div class="middle">
			<div class="ellipse_out1">
				<div class="ellipse_center1">
					<div class="ellipse_in1">
						<div id="searchFormContent" class="cnt">
							<jsp:doBody />
							<span class="search_btn_box">
							<input id="search" name="search" class="search_btn" type="button" onclick="${searchOnclick}" title="<fmt:message key="button.search"/>" alt="<fmt:message key="button.search"/>" />&nbsp;&nbsp;
							<input id="btnSearch" name="btnSearch" type="hidden" value="true"/>
							<input id="reset" type="button" class="reset" value="<fmt:message key="search.reset"/>" <c:if test="${not empty resetOnclick}">onclick="${resetOnclick}"</c:if>/>
							</span>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	</form>
</content>